package com.ljh.product.controller;

import com.ljh.product.model.ProductInfo;
import com.ljh.product.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: Themberfue
 * @date: 2025/4/10 23:49
 * @description:
 */
@RequestMapping("/product")
@RestController
public class ProductController {
    @Autowired
    ProductService productService;

    @GetMapping("/{productId}")
    public ProductInfo getProductById(@PathVariable("productId") Integer productId) {
        return productService.getProductById(productId);
    }
}
